let h4 = document.querySelectorAll("h4")
let main = document.querySelectorAll(".main")
let lastindex = 0
let index = 0
for(let i = 0;i < h4.length;i++){
    h4[i].addEventListener('mouseenter',function(){
        main[lastindex].style = 'height:0px;display:none'
        index = i
        main[index].style = 'height:200px'
        lastindex = index
    })
}